Skip to content

Instantly share code, notes, and snippets.

@kwea123
kwea123 / f2nerf-fig4.ipynb
Last active May 11, 2024 07:23
Script to interactively understand Fig. 4 in F2-NeRF (2d toy example with 2 cameras)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@smdabdoub
smdabdoub / merge_git_repo_as_subdir
Created June 9, 2015 14:02
Merge one git repository into another repository as a sub-directory
# based on the following:
# http://saintgimp.org/2013/01/22/merging-two-git-repositories-into-one-repository-without-losing-file-history/
# http://blog.caplin.com/2013/09/18/merging-two-git-repositories/
git clone repo_main
git clone repo_sub
cd repo_main
git remote add repo_sub ../repo_sub
git fetch repo_sub
@shahanahmed86
shahanahmed86 / oracle.md
Last active May 11, 2024 07:19
install oracle 11g database in ubuntu

Step 1: Download Oracle Database Express Edition.

http://www.oracle.com/technetwork/database/database-technologies/express-edition/downloads/index.html

Step 2: Instructions before install Oracle

1. Copy the downloaded file and paste it in home directory.

2. Unzip using the command:

unzip oracle-xe-11.2.0-1.0.x86_64.rpm.zip

@erikyuzwa
erikyuzwa / wordpress-6-2-2-docker-compose.yml
Last active May 11, 2024 07:13
Wordpress 6.2.2 Docker Compose for Local Development
# create a local .env file with the following 4 properties:
#
# MYSQL_DATABASE=<something>
# MYSQL_USER=<something>
# MYSQL_PASSWORD=<something>
# MYSQL_ROOT_PASSWORD=<something>
#
# Note: I have had a LOT of issues working with anything newer then Docker Desktop v4.26.1
# If you're on something newer, then double check against this release.
#
@matusnovak
matusnovak / README.md
Last active May 11, 2024 07:10
GPG + Git SSH Authentication and Signing on Windows 10

GPG + Git SSH Authentication and Signing on Windows 10

Introduction

This simple Gist will explain how to settup your GPG key to work for SSH authentication (with Git) and Git commit signing on Windows 10. This may seem straightforward on Linux, but there are certain tweaks needed on Windows.

No Cygwin, no MinGW, no Git Bash or any other Linux emulated environment. This works in pure Windows 10.

Software needed

@wojteklu
wojteklu / clean_code.md
Last active May 11, 2024 07:08
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@the-bass
the-bass / rename_state_dict_keys.py
Last active May 11, 2024 07:07
Rename the parameters of a PyTorch module's saved state dict. Last tested with PyTorch 1.0.1.
import torch
from collections import OrderedDict
def rename_state_dict_keys(source, key_transformation, target=None):
"""
source -> Path to the saved state dict.
key_transformation -> Function that accepts the old key names of the state
dict as the only argument and returns the new key name.
target (optional) -> Path at which the new state dict should be saved

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

@RobTrew
RobTrew / soundDeviceToggle.js
Last active May 11, 2024 07:04
Toggling OS X Sound Output Devices with JXA Javascript for Automation (OS X 10.10)
// Rob Trew @complexpoint 2015
function run() {
"use strict";
var blnUseKeyboardMaestro = false;
// EDIT TO NAMES OF TWO ALTERNATIVE SOUND OUTPUT DEVICES
var dctSources = { // A unique substring for each is enough
primary: "Internal",
secondary: "Elgato"